package com.yxq.mdt.app.modules.personal.presenter;

import com.yxq.mdt.app.base.BasePresenter;
import com.yxq.mdt.app.modules.personal.bean.FootBean;
import com.yxq.mdt.app.modules.personal.bean.RecordUserListBean;
import com.yxq.mdt.app.modules.personal.model.FootModel;
import com.yxq.mdt.app.net.ApiModel;

public class FootPresenter extends BasePresenter<IFootContract.View, FootModel> implements IFootContract.Presenter {

    public FootPresenter(IFootContract.View rootView, FootModel model) {
        super(rootView, model);
    }

    @Override
    public void selectMyAccessRecord(int pageNum, int pageSize) {
        mBaseModel.selectMyAccessRecord(pageNum, pageSize, new ApiModel.CommonCallback<FootBean>() {
            @Override
            public void onSuccess(FootBean data) {
                mRootView.onLoadSuccess(data);
            }

            @Override
            public void onError(String errMsg) {
                mRootView.onLoadFailed(errMsg);
            }
        });
    }

    public void selectMyViewRecordVoList(int pageNum, int pageSize, int dayNum, int shareView, String userId, int viewType) {
        mBaseModel.selectMyViewRecordVoList(pageNum, pageSize, dayNum, shareView, userId, viewType, new ApiModel.CommonCallback<RecordUserListBean>() {
            @Override
            public void onSuccess(RecordUserListBean data) {
                mRootView.onLoadUserListSuccess(data);
            }

            @Override
            public void onError(String errMsg) {
                mRootView.onLoadUserListFailed(errMsg);
            }
        });
    }
}
